package org.apache.click.doubleclick.annotationconfig.annotations;

import org.apache.click.service.ConfigService;

import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

/**
 * Annotation to use to define auto binding configuration. Only one auto binding
 * configuration is allowed for each application. If more then one auto binding
 * configuration is found for one application, then a runtime exception will be
 * thrown. Default auto binding mode is <i>DEFAULT</i>.
 *
 * @author Jahid Shohel(jshohel@gmail.com)
 */
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.TYPE)
public @interface AutoBinding {
    /**
     * Returns the configured auto binding value. The default value is <i>DEFAULT</i>
     *
     * @return The configured auto binding value.
     */
    public ConfigService.AutoBinding value() default ConfigService.AutoBinding.DEFAULT;
}
